import { boot } from 'quasar/wrappers'
import { GlobalCfgDef } from '@njt/foundation/defs/comm'
import fxInit from '@njt/foundation'
import wmsInit from '@njt/wms'
import wmsPdaInit from '../lib'

export default boot(async ({ app, router }) => {
  const globalCfg: GlobalCfgDef = {
    useStrictPassword: false,
    encTransPwd: false,
    mfFieldOptions: {},
    manuallyConfigVueRouter: true,
    manuallySetAppconfigJson: true,
    enableRoleCompanyRelationDataRight: false,
    enableRoleCustomerRelationDataRight: false,
    enableRoleVendorRelationDataRight: false,
    enableRoleStorerRelationDataRight: true,
    enableRoleWhRelationDataRight: true,
    enableRoleCbRelationDataRight: false,
    enableAccessoryPackDownload: true,
    enableRoleStorerOrgRelationDataRight: false
  }
  await fxInit(app, router, globalCfg, import.meta.env)
  wmsInit(app)
  wmsPdaInit(app)
})
